﻿module Sustainalytics.Common {

    var mod = angular.module(commonModuleName);

    mod.filter('dateQuarter', function () {

        return function (input) {
            var date = new Date(input);
            var quarter = Math.floor((date.getMonth() + 1) / 3);
            var year = date.getFullYear();

            return 'Q' + quarter + ' ' + year;
        }
    });
}